package com.mercenary.wein.screenControl.ui.util;

import com.mercenary.wein.screenControl.bean.DeviceBean;
import com.mercenary.wein.screenControl.deviceControll.AndroidDevice;
import com.mercenary.wein.screenControl.deviceControll.DeviceControlDecorator;

import java.util.List;
import java.util.Map;

/**
 * Created by tuxiao on 2017/3/19.
 */
public class CommonTools {
    public static void getAndroidDeviceByDeviceBean(Map<String,DeviceControlDecorator> dcdMap, List<DeviceBean> dbs ,List<AndroidDevice> result){
        result.removeAll(result);
        for(DeviceBean db:dbs){
            if(!dcdMap.containsKey(db.getSerialNo()))continue;
            AndroidDevice androidDevice = dcdMap.get(db.getSerialNo()).getAndroidDevice();
            result.add(androidDevice);
        }
    }

}
